home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / OpenDoc 1.2b2c1 / OpenDoc / Interfaces / IDL / StorageU.idl < prev    next >
Encoding:
Text File  |  1997-01-01  |  5.1 KB  |  210 lines  |  [TEXT/MPS ]

  1. //#    Copyright:    © 1993-1994 by Apple Computer, Inc., all rights reserved.
  2.  
  3. #ifndef _STORAGEU_
  4. #define _STORAGEU_
  5.  
  6. #ifndef _REFCTOBJ_
  7. #include "RefCtObj.idl"
  8. #endif
  9.  
  10. //==============================================================================
  11. // Classes defined in this interface
  12. //==============================================================================
  13. interface   ODStorageUnit;
  14.  
  15. //==============================================================================
  16. // Classes used by this interface
  17. //==============================================================================
  18. interface   ODDraft;
  19. interface   ODSession;
  20. interface   ODPart;
  21. interface   ODStorageUnitCursor;
  22. interface   ODStorageUnitView;
  23. interface   ODStorageUnitRefIterator;
  24.  
  25. //==============================================================================
  26. // ODStorageUnit
  27. //==============================================================================
  28.  
  29. interface ODStorageUnit :  ODRefCntObject 
  30. {
  31.     ODDraft        GetDraft();
  32.     
  33.     ODSession    GetSession();
  34.     
  35.     ODBoolean    Exists(in ODPropertyName propertyName,
  36.                     in ODValueType valueType, 
  37.                     in ODValueIndex valueIndex);
  38.     
  39.     ODBoolean  ExistsWithCursor(in ODStorageUnitCursor cursor);
  40.     
  41.     ODULong  CountProperties();
  42.     
  43.     ODULong  CountValues();
  44.     
  45.     ODStorageUnit   Focus(in ODPropertyName propertyName,
  46.                             in ODPositionCode propertyPosCode,
  47.                             in ODValueType valueType,
  48.                             in ODValueIndex valueIndex,
  49.                             in ODPositionCode  valuePosCode);
  50.     
  51.     ODStorageUnit   FocusWithCursor(in ODStorageUnitCursor cursor);
  52.         
  53.     ODStorageUnit   Externalize();
  54.     
  55.     ODStorageUnit   Internalize();
  56.     
  57.     ODID      GetID();
  58.     
  59.     ODStorageUnitName GetName();
  60.     
  61.     void SetName(in ODStorageUnitName name);
  62.     
  63.     ODStorageUnit   AddProperty(in ODPropertyName propertyName);
  64.     
  65.     ODStorageUnit  AddValue(in ODValueType type);
  66.     
  67.     ODStorageUnit   Remove();
  68.     
  69.     void      CloneInto(in ODDraftKey key,
  70.                         in ODStorageUnit destStorageUnit,
  71.                         in ODID scopeID);
  72.     
  73.     ODStorageUnitView   CreateView();
  74.     
  75.     ODStorageUnitCursor    CreateCursorWithFocus();
  76.     
  77.     ODStorageUnitCursor CreateCursor(in ODPropertyName propertyName,
  78.                                     in ODValueType valueType,
  79.                                     in ODValueIndex valueIndex);
  80.     
  81.     ODPropertyName  GetProperty();
  82.     
  83.     ODValueType  GetType();
  84.     
  85.     void      SetType(in ODValueType valueType);
  86.     
  87.     void      SetOffset(in ODULong offset);
  88.     
  89.     ODULong    GetOffset();
  90.     
  91.     ODULong    GetValue(in ODULong length, out ODByteArray value);
  92.     
  93.     void      SetValue(in ODByteArray value);
  94.     
  95.     void      InsertValue(in ODByteArray value);
  96.     
  97.     void      DeleteValue(in ODULong length);
  98.     
  99.     ODULong    GetSize();
  100.     
  101.     ODBoolean    IsValidStorageUnitRef(in ODStorageUnitRef aRef);
  102.     
  103.     void GetStrongStorageUnitRef(in ODStorageUnitID embeddedSUID, out ODStorageUnitRef strongRef);
  104.     
  105.     void GetWeakStorageUnitRef(in ODStorageUnitID embeddedSUID, out ODStorageUnitRef weakRef);
  106.     
  107.     ODBoolean    IsStrongStorageUnitRef(in ODStorageUnitRef ref);
  108.     
  109.     ODBoolean    IsWeakStorageUnitRef(in ODStorageUnitRef ref);
  110.     
  111.     ODStorageUnit   RemoveStorageUnitRef(in ODStorageUnitRef aRef);
  112.     
  113.     ODStorageUnitID  GetIDFromStorageUnitRef(in ODStorageUnitRef aRef);
  114.     
  115.     ODStorageUnitRefIterator  CreateStorageUnitRefIterator();
  116.  
  117.     void     SetStorageUnitRef(in ODStorageUnitID embeddedSUID,
  118.                                             in ODStorageUnitRef ref);
  119.     
  120.     ODULong      GetGenerationNumber();
  121.     
  122.     ODULong      IncrementGenerationNumber();
  123.     
  124.     ODBoolean  IsPromiseValue();
  125.     
  126.     void    SetPromiseValue(in ODValueType valueType, 
  127.                             in ODULong offset,
  128.                             in ODByteArray value, 
  129.                               in ODPart sourcePart);
  130.     
  131.     ODULong  GetPromiseValue(in ODValueType valueType,
  132.                             in ODULong offset,
  133.                             in ODULong length,
  134.                             out ODByteArray value,
  135.                             out ODPart sourcePart);
  136.     
  137.     void    ClearAllPromises();
  138.     
  139.     void    ResolveAllPromises();
  140.     
  141.     ODStorageUnitKey  Lock(in ODStorageUnitKey key);
  142.     
  143.     void        Unlock(in ODStorageUnitKey key);
  144. #ifdef __SOMIDL__
  145.   implementation
  146.   {
  147.     majorversion = 1; minorversion = 0;
  148.       functionprefix = ODStorageUnit;
  149.     override:
  150.         somUninit,
  151.         Acquire,
  152.         Release,
  153.         Purge;
  154.     releaseorder:
  155.         reserved1,
  156.         GetDraft,
  157.         GetSession,
  158.         Exists,
  159.         ExistsWithCursor,
  160.         CountProperties,
  161.         CountValues,
  162.         Focus,
  163.         FocusWithCursor,
  164.         Externalize,
  165.         Internalize,
  166.         GetID,
  167.         GetName,
  168.         SetName,
  169.         AddProperty,
  170.         AddValue,
  171.         Remove,
  172.         CloneInto,
  173.         CreateView,
  174.         CreateCursor,
  175.         CreateCursorWithFocus,
  176.         GetProperty,
  177.         GetType,
  178.         SetType,
  179.         SetOffset,
  180.         GetOffset,
  181.         GetValue,
  182.         SetValue,
  183.         InsertValue,
  184.         DeleteValue,
  185.         GetSize,
  186.         IsValidStorageUnitRef,
  187.         GetStrongStorageUnitRef,
  188.         GetWeakStorageUnitRef,
  189.         IsStrongStorageUnitRef,
  190.         IsWeakStorageUnitRef,
  191.         RemoveStorageUnitRef,
  192.         GetIDFromStorageUnitRef,
  193.         CreateStorageUnitRefIterator,
  194.          SetStorageUnitRef,
  195.         GetGenerationNumber,
  196.         IncrementGenerationNumber,
  197.         IsPromiseValue,
  198.         SetPromiseValue,
  199.         GetPromiseValue,
  200.         ClearAllPromises,
  201.         ResolveAllPromises,
  202.         Lock,
  203.         Unlock;
  204.   };
  205. #endif
  206. };
  207.  
  208. #endif  // _STORAGEU_
  209.  
  210.